package 考试题;

public class Boss implements CallBackInterface {
    private Employee employee;

    public void setEmployee(Employee employee) {
        employee.init(this);
        this.employee = employee;
    }

    //通知员工工作
    public void callEmployeeToWork(int num) {
        employee.work(num);
    }

    @Override
    public void callBack(int result) {
        //接收到员工发送过来的通知
        System.out.println("获取到员工的工作成果:" + result);
    }


}
